Feature/engine abstraction refactor#20
Merged
PrasanthYT merged 4 commits intomainfrom Mar 4, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This change introduces a unified engine abstraction layer and refactors the existing SCA implementation into a pluggable engine.
The goal is to establish a stable, engine-agnostic contract before expanding Scanr into additional scanning domains (container, IaC, SAST, secrets).
No behavioral changes were introduced.
Architecture Changes
New
scanr-engineCrateIntroduced a new crate defining the core engine contract:
EngineTypeFindingSeverityScanInputScanResultScanMetadataScanEnginetraitThis crate now represents the stable security schema across all engines.
Unified Finding Model
All engines now return findings in a standardized format:
This becomes the canonical security data model.
SCA Refactored into
scanr-scaThe previous
scanr-corecrate has been renamed toscanr-sca.It now:
Depends on
scanr-engineImplements the
ScanEnginetraitWraps its results into the unified
FindingmodelPreserves:
No SCA logic was removed or altered.
Engine Invocation Updated
CLI now invokes engines via abstraction:
Direct SCA coupling has been removed.
Policy Layer Decoupled
Policy evaluation is now engine-agnostic.
Instead of operating on SCA-specific structures, it consumes:
This allows future engines to integrate seamlessly without modifying policy logic.
Behavioral Guarantees
All existing tests pass.
Strategic Impact
This refactor establishes:
A stable engine contract
Clear separation of concerns
Pluggable scanning architecture
Future support for:
Scanr now transitions from a single-engine tool to a multi-engine security platform foundation.